home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / Makefile < prev    next >
Encoding:
Makefile  |  1991-07-15  |  3.4 KB  |  107 lines

  1. #
  2. # makefile for watcher
  3. #
  4. # SYS should be either BSD or SYSV
  5. SYS = BSD
  6.  
  7. OBJS = baderr.o check_item.o checkline.o do_args.o doit.o externs.o\
  8.     find_of.o find_pre_cmd.o find_pre_val.o get_col_fld.o tchar.o\
  9.     get_rel_fld.o getargv.o init_sigs.o line_to_vec.o main.o\
  10.     open_cf.o open_hf.o pp.o pp_change.o pp_out.o read_hist.o\
  11.     save_key.o control.o yyerror.o yylex.o abs_check.o xmalloc.o\
  12.     pct_check.o maxmin_check.o str_check.o hist_key.o hist_cmd.o\
  13.     hist_value.o build_abs.o build_cmd.o build_col.o strsave.o\
  14.     build_maxmin.o build_pct.o build_rel.o build_str.o to_double.o\
  15.     chk_rel_item.o chk_col_item.o build_any.o any_check.o to_string.o
  16. #CFLAGS = -O -D$(SYS)
  17. CFLAGS = -g -D$(SYS)
  18.  
  19. #
  20. # for sending out copies.  
  21. #
  22. # files that should be included
  23. DIST = Makefile Docs Docs/* Support Support/* Ideas
  24. # when making a copy for transfer via ftp or similar means
  25. ARCHIVE = tar
  26. ARCFLAGS = cf -
  27. # when making a copy for net distribution
  28. SHAR = shar
  29. SHARFLAGS =
  30.  
  31. # the name of a pretty-printer.  choices might include `pr', `vgrind', etc
  32. PPRINT = tgrind
  33.  
  34. # The following section is generated automatically in the makefile entry.
  35. # SRCBEGIN -- Do not remove this line
  36. C_SRCS = Cyylex.c abs_check.c any_check.c baderr.c build_abs.c build_any.c\
  37.     build_cmd.c build_col.c build_maxmin.c build_pct.c build_rel.c\
  38.     build_str.c check_col_item.c check_item.c check_rel_item.c checkline.c\
  39.     do_args.c doit.c externs.c find_of.c find_pre_cmd.c find_pre_val.c\
  40.     get_col_fld.c get_rel_fld.c getargv.c hist_cmd.c hist_key.c\
  41.     hist_value.c init_sigs.c line_to_vec.c main.c maxmin_check.c open_cf.c\
  42.     open_hf.c pct_check.c pp.c pp_change.c pp_out.c read_hist.c save_key.c\
  43.     str_check.c strsave.c tchar.c to_double.c to_string.c xmalloc.c\
  44.     yyerror.c
  45. H_SRCS = defs.h
  46. L_SRCS = yylex.l
  47. Y_SRCS = control.y
  48. # SRCEND -- Do not remove this line
  49.  
  50. # $P is for sequent parallel make.  Don't worry if you don't have a sequent.
  51. watcher:$P $(OBJS)
  52.     $(CC) $(CFLAGS) -o watcher $(OBJS) $(LIBS)
  53.  
  54. clean:
  55.     rm -f a.out core watcher *.o y.tab.c y.tab.h y.output Make.out\
  56.         lex.yy.c Watcher.archive Lint.out control.c
  57.  
  58. lint:
  59.     lint -x $(CFLAGS) *.c > Lint.out
  60.  
  61. archive:
  62.     $(ARCHIVE) $(ARCFLAGS) README *.c *.h *.y *.l $(DIST) > Watcher.archive
  63.  
  64. # Two shar files are made because one is too large for the mailers with
  65. # a 64K limit.
  66. dist distribution shar:
  67.     $(SHAR) $(SHARFLAGS) README *.c > Watcher.dist1
  68.     $(SHAR) $(SHARFLAGS) *.h *.l *.y $(DIST) > Watcher.dist2
  69.  
  70. print:: $(C_SRCS) $(H_SRCS) $(L_SRCS)
  71.     $(PPRINT) -lC $?
  72.  
  73. print:: $(Y_SRCS)
  74.     $(PPRINT) -lyacc $?
  75.  
  76. print::
  77.     touch print
  78.  
  79. # you should only do this after a make clean; otherwise you'll get the
  80. # files created by yacc included in the source list.
  81. Makefile makefile:
  82.     mv Makefile Makefile.backup
  83.     sed -n '1,/SRCBEGIN/p' Makefile.backup > Makefile
  84.     ls *.c | egrep -v 'y.tab.c|lex.yy.c' | fmt | \
  85.         sed -e '$$!s/$$/\\/' -e '1s/^/C_SRCS = /' -e \
  86.         '2,$$s/^/    /' >> Makefile
  87.     ls *.h | egrep -v y.tab.h | fmt | sed 's/^/H_SRCS = /' >> Makefile
  88.     ls *.l | fmt | sed 's/^/L_SRCS = /' >> Makefile
  89.     ls *.y | fmt | sed 's/^/Y_SRCS = /' >> Makefile
  90.     sed -n '/SRCEND/,$$p' Makefile.backup >> Makefile
  91.  
  92. control.o y.tab.h: control.y
  93.     -mv y.tab.h y.tab.h.old
  94.     yacc -d control.y
  95.     -if cmp -s y.tab.h y.tab.h.old; then mv y.tab.h.old y.tab.h; \
  96.         else rm y.tab.h.old; fi
  97.     touch y.tab.h
  98.     mv y.tab.c control.c
  99.     $(CC) $(CFLAGS) -c control.c
  100.     rm control.c
  101.  
  102. # a C version of the lexical analyxer is also supplied as Cyylex.c
  103. yylex.o: yylex.l
  104.  
  105. checkline.o check_item.o: y.tab.h
  106. $(OBJS): defs.h y.tab.h
  107.